//:C09:Rectangle.cpp
// Access & mutators
class Rectangle
{
    int wide, high;
    public:
        Rectangle(int w = 0, int h = 0)
            :wide(w), high(h){}
        int width() const { return wide; }    // Read
        void width(int w) { wide = w; }     // Set
        int height() const { return high; }  // Read
        void height(int h) { high = h; }    // Set          
};

int main(void)
{
    Rectangle r(19, 47);
    // Change width & height:
    r.height(2 * r.width());
    r.width(2 * r.height());
}